package com.meixiang.entity.shopping;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;

/**
 * 商品评论
 *
 * @author LZRUI
 */
public class GoodsEvaluateEntity implements Parcelable {

    private String gevalId; // 评论
    private String gevalGoodsid; // 商品表编号
    private String gevalGoodsname; // 商品名称
    private String gevalFrommemberid; // 评价人编号
    private String gevalFrommembername; // 评价人名称
    private String gevalContent; // 信誉评价内容
    private String createTime; // 创建时间
    private String memberAvatar; // 用户头像
    private ArrayList<String> commentImages; // 评论图片

    public GoodsEvaluateEntity() {
    }

    public GoodsEvaluateEntity(String gevalId, String gevalGoodsid, String gevalGoodsname, String gevalFrommemberid, String gevalFrommembername, String gevalContent, String createTime, String memberAvatar, ArrayList<String>  commentImages) {
        this.gevalId = gevalId;
        this.gevalGoodsid = gevalGoodsid;
        this.gevalGoodsname = gevalGoodsname;
        this.gevalFrommemberid = gevalFrommemberid;
        this.gevalFrommembername = gevalFrommembername;
        this.gevalContent = gevalContent;
        this.createTime = createTime;
        this.memberAvatar = memberAvatar;
        this.commentImages = commentImages;
    }

    public String getGevalId() {
        return gevalId == null ? "" : gevalId;
    }

    public void setGevalId(String gevalId) {
        this.gevalId = gevalId;
    }

    public String getGevalGoodsid() {
        return gevalGoodsid == null ? "" : gevalGoodsid;
    }

    public void setGevalGoodsid(String gevalGoodsid) {
        this.gevalGoodsid = gevalGoodsid;
    }

    public String getGevalGoodsname() {
        return gevalGoodsname == null ? "" : gevalGoodsname;
    }

    public void setGevalGoodsname(String gevalGoodsname) {
        this.gevalGoodsname = gevalGoodsname;
    }

    public String getGevalFrommemberid() {
        return gevalFrommemberid == null ? "" : gevalFrommemberid;
    }

    public void setGevalFrommemberid(String gevalFrommemberid) {
        this.gevalFrommemberid = gevalFrommemberid;
    }

    public String getGevalFrommembername() {
        return gevalFrommembername == null ? "" : gevalFrommembername;
    }

    public void setGevalFrommembername(String gevalFrommembername) {
        this.gevalFrommembername = gevalFrommembername;
    }

    public String getGevalContent() {
        return gevalContent == null ? "" : gevalContent;
    }

    public void setGevalContent(String gevalContent) {
        this.gevalContent = gevalContent;
    }

    public String getCreateTime() {
        return createTime == null ? "" : createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getMemberAvatar() {
        return memberAvatar == null ? "" : memberAvatar;
    }

    public void setMemberAvatar(String memberAvatar) {
        this.memberAvatar = memberAvatar;
    }

    public ArrayList<String>  getCommentImages() {
        return commentImages;
    }

    public void setCommentImages(ArrayList<String>  commentImages) {
        this.commentImages = commentImages;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.gevalId);
        dest.writeString(this.gevalGoodsid);
        dest.writeString(this.gevalGoodsname);
        dest.writeString(this.gevalFrommemberid);
        dest.writeString(this.gevalFrommembername);
        dest.writeString(this.gevalContent);
        dest.writeString(this.createTime);
        dest.writeString(this.memberAvatar);
        dest.writeStringList(this.commentImages);
    }

    protected GoodsEvaluateEntity(Parcel in) {
        this.gevalId = in.readString();
        this.gevalGoodsid = in.readString();
        this.gevalGoodsname = in.readString();
        this.gevalFrommemberid = in.readString();
        this.gevalFrommembername = in.readString();
        this.gevalContent = in.readString();
        this.createTime = in.readString();
        this.memberAvatar = in.readString();
        this.commentImages = in.createStringArrayList();
    }

    public static final Creator<GoodsEvaluateEntity> CREATOR = new Creator<GoodsEvaluateEntity>() {
        @Override
        public GoodsEvaluateEntity createFromParcel(Parcel source) {
            return new GoodsEvaluateEntity(source);
        }

        @Override
        public GoodsEvaluateEntity[] newArray(int size) {
            return new GoodsEvaluateEntity[size];
        }
    };
}
